<?php
class Contrato extends AppModel 
{
	var $name = 'Contrato';
	var $belongsTo = array
	(
		'Cliente' => array
		(
			'className' => 'Cliente',
			'conditions' => '',
			'order'   => '',
			'foreignKey' => 'clientes_id'
		)
	);
	
	function cambiarFechaFin($iIdCliente,$dFechaFinNueva){
		$update_query = "UPDATE contratos SET fecha_fin = '$dFechaFinNueva' WHERE clientes_id = $iIdCliente";
		if($this->execute($update_query))
			return true;
		else
			return false;
	}
}
?>